﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;

namespace CMSMVC4.Areas.Admin.Models
{
    public class LogInModel
    {
        [Required(ErrorMessageResourceType = typeof (MultiResource.Admin), ErrorMessageResourceName = "LogInModel_Account_Username_is_required")]
        public string Account { get; set; }

        [Required(ErrorMessageResourceType = typeof (MultiResource.Admin), ErrorMessageResourceName = "LogInModel_Password_Password_is_required")]
        [DataType(DataType.Password)]
        public string Password { get; set; }
    }

    public class ChangePasswordModel
    {

        [Required(ErrorMessage = "Mật khẩu không được để trống")]
        [DataType(DataType.Password)]
        public string Pasword { get; set; }

        [Required(ErrorMessageResourceType = typeof(MultiResource.AdminModels), ErrorMessageResourceName = "NewPasswordRequired")]
         [DataType(DataType.Password)]
        public string NewPassword { get; set; }

        [Compare("NewPassword",ErrorMessageResourceType = typeof(MultiResource.AdminModels), ErrorMessageResourceName = "ConfirmPasswordNotMatch")]
        [DataType(DataType.Password)]
        public string ConfirmPassword { get; set; }
    }
}